//
//  XSPhotoModel.h
//  AudioVideo
//
//  Created by xueshan1 on 2019/9/11.
//  Copyright © 2019 xueshan1. All rights reserved.
//

#import <Foundation/Foundation.h>


/**
 每一个资源(图片or视频)
 */
@interface XSPhotoModel : NSObject

//asset对象
@property (nonatomic, strong) PHAsset *asset;
//asset类型
@property (nonatomic, assign) XSAssetMediaType type;
//视频时长
@property (nonatomic, copy) NSString *duration;
//网络/本地 图片url
@property (nonatomic, strong) NSURL *url ;
//图片
@property (nonatomic, strong) UIImage *image;
@property(nonatomic,strong)NSURL *videoURL;
@property(nonatomic,strong)AVAsset *avasset;
//是否被选择
@property (nonatomic, assign, getter=isSelected) BOOL selected;

+ (instancetype)modelWithAsset:(PHAsset *)asset type:(XSAssetMediaType)type duration:(NSString *)duration;


@end


/**
 每一个相册
 */
@interface XSAlbumListModel : NSObject

@property (nonatomic, copy) NSString *title;
@property (nonatomic, assign) NSInteger count;
//相机胶卷?
@property (nonatomic, assign) BOOL isCameraRoll;
@property (nonatomic, strong) PHFetchResult *fetchResult;
//相册第一张图asset对象
@property (nonatomic, strong) PHAsset *headImageAsset;
//该相册下的所有资源
@property (nonatomic, strong) NSArray<XSPhotoModel *> *models;


@end
